import {FormRuleUtil} from "@/utils";

export const KIND_EDIT = {
    BODY: {
        code: null,
        description: null,
        name: null,
        icon: null,

    },
    RULES: {
        code: FormRuleUtil.strRule("分类代码", true, 30, "abc"),
        name: FormRuleUtil.strRule("分类名称", true, 30),
        icon: FormRuleUtil.strRule("绑定图标", true, 30),
        description: FormRuleUtil.strRule("分类描述", false, 255),

    }
}


export const GOODS_EDIT = {
    BODY: {
        title: '',
        stockTotal: 0,
        picture: '',
        detail: '',
        stdPrice: 1,
        state:'' ,
        disPrice: 1,
        kind: {code: ''}

    },
    RULES: {
        title: FormRuleUtil.strRule("商品标题", true, 200),
        stockTotal: FormRuleUtil.numRule("可用库存", true, 0),
        picture: FormRuleUtil.strRule("商品主图", true, 30),
        state: FormRuleUtil.strRule("商品状态", true, 30),
        detail: FormRuleUtil.strRule("商品详情", false),
        stdPrice: FormRuleUtil.numRule("标准价", true, 1),
        disPrice: FormRuleUtil.numRule("折扣价", true, 1),
        kind: {code: FormRuleUtil.strRule('所属分类', true)}
    }
}


export const EGG_SEND = {
    BODY:{
        id:'' ,
        expressName:'',
        expressCode:'',
        expressFee:0,
    },
    RULES: {
        expressName: FormRuleUtil.strRule("快递名称", true  , 30),
        expressCode: FormRuleUtil.strRule("快递单号", true, 30),
        expressFee: FormRuleUtil.numRule("快递费用", true, 0)
    }
}
